#include "controller.h"

Controller::Controller(int totalTasks, QObject *parent)
    : QObject(parent)
    , m_totalTasks(totalTasks)
    , m_count(0)
{

}

void Controller::notifyTaskFinish()
{
    if(++m_count == m_totalTasks){
        emit allTasksFinished();
        m_count = 0;
    }
}
